package com.ryder.subject.common.enums;

import lombok.Getter;

/**
 * 描述: 删除岗位分类状态枚举
 *
 * @author Ryder
 * @version 1.0
 * @date 2025/02/05
 * @since 1.0 // 版本号，指明从哪个版本开始
 */
@Getter
public enum IsDeleteFlagEnum {

    DELETED(1, "已删除"),
    UN_DELETED(0, "未删除");

    private Integer code;
    private String desc;

    IsDeleteFlagEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static IsDeleteFlagEnum getByCode(int codeVal) {
        for (IsDeleteFlagEnum isDeleteFlagEnum : IsDeleteFlagEnum.values()) {
            if (isDeleteFlagEnum.getCode() == codeVal) {
                return isDeleteFlagEnum;
            }
        }
        return null;
    }
}
